Skip to content

Visco and anisotropy multiple dispatch#57

Merged
jmartfrut merged 6 commits into
mainfrom
visco-dispatch
Nov 11, 2025
Merged

Visco and anisotropy multiple dispatch#57
jmartfrut merged 6 commits into
mainfrom
visco-dispatch

Conversation

@miguelmaso
Copy link
Copy Markdown
Collaborator

This PR is a draft. I want to make easier the weak forms, I'd like there were agnostic with respect to the constitutive model, the only dispatch is the phyisics: mechano, electro, thermo

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 7, 2025

Benchmark Results (Julia v1)

Time benchmarks
main a6810f9... main / a6810f9...
Constitutive models/Visco-elastic Ψ 0.0496 ± 0.03 ms 0.0491 ± 0.028 ms 1.01 ± 0.84
Constitutive models/Visco-elastic ∂Ψu 0.0652 ± 0.0063 ms 0.0642 ± 0.011 ms 1.01 ± 0.2
Constitutive models/Visco-elastic ∂Ψuu 0.114 ± 0.017 ms 0.112 ± 0.016 ms 1.02 ± 0.21
Simulations/StaticMechanicalDirichlet 0.158 ± 0.01 s 0.16 ± 0.012 s 0.989 ± 0.1
Simulations/StaticMechanicalNeumann 0.192 ± 0.0098 s 0.192 ± 0.0085 s 0.996 ± 0.067
Simulations/ViscoElastic 8.24 s 8.27 s 0.996
Tensor algebra/δδ_λ_2d 30 ± 0 ns 30 ± 0 ns 1 ± 0
Tensor algebra/δδ_μ_2d 30 ± 0 ns 30 ± 0 ns 1 ± 0
time_to_load 2.5 ± 0.019 s 2.5 ± 0.012 s 1 ± 0.0091
Memory benchmarks
main a6810f9... main / a6810f9...
Constitutive models/Visco-elastic Ψ 1.25 k allocs: 0.0794 MB 1.25 k allocs: 0.0794 MB 1
Constitutive models/Visco-elastic ∂Ψu 1.37 k allocs: 0.0917 MB 1.37 k allocs: 0.0917 MB 1
Constitutive models/Visco-elastic ∂Ψuu 2.31 k allocs: 0.158 MB 2.31 k allocs: 0.158 MB 1
Simulations/StaticMechanicalDirichlet 1.7 M allocs: 0.118 GB 1.7 M allocs: 0.118 GB 1
Simulations/StaticMechanicalNeumann 2.19 M allocs: 0.14 GB 2.19 M allocs: 0.14 GB 1
Simulations/ViscoElastic 0.127 G allocs: 8.28 GB 0.127 G allocs: 8.28 GB 1
Tensor algebra/δδ_λ_2d 0 allocs: 0 B 0 allocs: 0 B
Tensor algebra/δδ_μ_2d 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.149 k allocs: 11.1 kB 0.149 k allocs: 11.1 kB 1

@miguelmaso miguelmaso changed the title [NOT TO MERGE] Visco and anisotropy multiple dispatch Visco and anisotropy multiple dispatch Nov 7, 2025
@miguelmaso miguelmaso marked this pull request as ready for review November 7, 2025 14:03
@miguelmaso
Copy link
Copy Markdown
Collaborator Author

@jmartfrut ready to be reviewed

@miguelmaso
Copy link
Copy Markdown
Collaborator Author

It's not 100% needed to merge this constribution, but it can be useful for inspiration.

After implementing this, I've come to two conclusions:

  • The order of passing arguments to the weak form/constitutive model should be: 1) degrees of freedom, 2) variables
  • We should have a brainstorming and discuss towards a clear definition of the structures reflecting the scientific definitions: physics, kinematics, constitutive model, weak form, etc.

@jmartfrut jmartfrut merged commit 0fd19e9 into main Nov 11, 2025
4 checks passed
@miguelmaso miguelmaso deleted the visco-dispatch branch November 12, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants